<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <title>Document</title>
        <style>
            [v-cloak] {
                display: none;
            }
        </style>
    </head>
    <body>
        <div id="app">
            <!-- <div v-pre>{{msg}}</div> -->
            <input type="text" v-model="val" />
            <span v-cloak>{{val}}</span>
            <p @click.once="clickMe">{{vals}}</p>
            <p v-once>{{msg}}</p>
            <p>{{msg}}</p>
            <button>按钮</button>  
        </div>
        <script src="../vue.js"></script>
        <script>
            let vm = new Vue({
                el: '#app',
                data() {
                    return {
                        msg: 'hello world',
                        val: '',
                        vals: 0,
                    };
                },
                methods: {
                    clickMe() {
                        this.vals++;
                        console.log('执行了');
                    },
                },
            });
        </script>
    </body>
</html>
